﻿<?xml version="1.0" encoding="utf-8"?>
<UserControl
    x:Class="Automator.Tasks.Core.UI.EditTaskHeader" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="clr-namespace:Automator.Tasks.Core">
    <UserControl.Resources>
        <core:Task
            x:Key="_task" />
    </UserControl.Resources>
    <Border
        BorderBrush="{x:Static SystemColors.ControlDarkBrush}"
        BorderThickness="1"
        Background="{x:Static SystemColors.WindowBrush}"
        Margin="0,0,0,8">
        <StackPanel
            x:Name="pnlContent"
            Orientation="Horizontal"
            DataContext="{StaticResource _task}">
            <Image
                x:Name="taskImage"
                VerticalAlignment="Center"
                Width="32"
                Height="32"
                Margin="16,8,8,8"
                Source="{Binding TaskImage}" />
            <Grid
                Margin="8">
                <Grid.RowDefinitions>
                    <RowDefinition
                        Height="Auto" />
                    <RowDefinition
                        Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition
                        Width="Auto" />
                    <ColumnDefinition
                        Width="Auto" />
                    <ColumnDefinition
                        Width="Auto" />
                    <ColumnDefinition
                        Width="Auto" />
                </Grid.ColumnDefinitions>
                <TextBlock
                    Text="Title:"
                    FontWeight="SemiBold"
                    Grid.Column="0"
                    Grid.Row="0"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Right" />
                <TextBlock
                    x:Name="edtTitle"
                    Grid.Column="1"
                    Grid.Row="0"
                    Margin="8,2,0,2"
                    Foreground="{x:Static SystemColors.GrayTextBrush}"
                    Text="{Binding Path=Title, UpdateSourceTrigger=Explicit}" />
                <TextBlock
                    Text="Description:"
                    FontWeight="SemiBold"
                    Grid.Column="0"
                    Grid.Row="1"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Right" />
                <TextBlock
                    x:Name="edtDescription"
                    Grid.Column="1"
                    Grid.Row="1"
                    Margin="8,2,0,2"
                    Foreground="{x:Static SystemColors.GrayTextBrush}"
                    Text="{Binding Path=Description, UpdateSourceTrigger=Explicit}" />
                <TextBlock
                    Text="Input:"
                    FontWeight="SemiBold"
                    Margin="16,0,0,0"
                    Grid.Column="2"
                    Grid.Row="0"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Right" />
                <TextBlock
                    x:Name="edtInput"
                    Grid.Column="3"
                    Grid.Row="0"
                    Margin="8,2,0,2"
                    Foreground="{x:Static SystemColors.GrayTextBrush}"
                    Text="{Binding Path=InputObject, UpdateSourceTrigger=Explicit}" />
                <TextBlock
                    Text="Output:"
                    FontWeight="SemiBold"
                    Margin="16,0,0,0"
                    Grid.Column="2"
                    Grid.Row="1"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Right" />
                <TextBlock
                    x:Name="edtOutput"
                    Grid.Column="3"
                    Grid.Row="1"
                    Margin="8,2,0,2"
                    Foreground="{x:Static SystemColors.GrayTextBrush}"
                    Text="{Binding Path=OutputObject, UpdateSourceTrigger=Explicit}" />
            </Grid>
        </StackPanel>
    </Border>
</UserControl>